package se.teamscape.server.guice;

import net.customware.gwt.dispatch.server.guice.ActionHandlerModule;
import se.teamscape.server.db.Datastore;
import se.teamscape.server.db.GAEDatastore;
import se.teamscape.server.rpc.GetModelHandler;
import se.teamscape.server.rpc.ModelsQueryHandler;
import se.teamscape.shared.rpc.GetModel;
import se.teamscape.shared.rpc.ModelsQuery;

import com.google.inject.Singleton;

public class ServerModule extends ActionHandlerModule {

    @Override
    protected void configureHandlers() {
        bind(Datastore.class).to(GAEDatastore.class).in(Singleton.class);
        bindHandler(GetModel.class, GetModelHandler.class);
        bindHandler(ModelsQuery.class, ModelsQueryHandler.class);
    }

}
